Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 578 Bytes

button C.rst

File metadata and controls

27 lines (18 loc) · 578 Bytes

button_c --- 板载按键C

button_c

button_c 模块的主要功能与函数

功能相关函数

is_pressed()

  获取按键C当前状态。 返回的结果是 True:按键被按下, 或者 False: 按键未被按下。

程序示例:

import codey

def loop():
    while True:
        if codey.button_c.is_pressed():
            print("button C is pressed")
loop()